feat: add implementation of stats/base/dists/wald/kurtosis#10216
feat: add implementation of stats/base/dists/wald/kurtosis#10216Planeshifter merged 4 commits intostdlib-js:developfrom
stats/base/dists/wald/kurtosis#10216Conversation
Signed-off-by: Bhargav Dabhade <bhargava2005dabhade@gmail.com>
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: passed
- task: lint_repl_help
status: passed
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: missing_dependencies
- task: lint_c_examples
status: missing_dependencies
- task: lint_c_benchmarks
status: missing_dependencies
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: passed
- task: lint_license_headers
status: passed
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
Planeshifter
left a comment
There was a problem hiding this comment.
Thanks for opening this PR!
|
|
||
| The [excess kurtosis][kurtosis] for a [Wald][wald-distribution] random variable with mean `μ` and shape parameter `λ > 0` is | ||
|
|
||
| <!-- <equation class="equation" label="eq:wald_expectation" align="center" raw="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" alt="Expected value for a Wald distribution."> --> |
There was a problem hiding this comment.
Looks like this equation label and alt text were carried over from the wald/mean package. The label should reference kurtosis, not expectation.
| <!-- <equation class="equation" label="eq:wald_expectation" align="center" raw="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" alt="Expected value for a Wald distribution."> --> | |
| <!-- <equation class="equation" label="eq:wald_kurtosis" align="center" raw="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" alt="Excess kurtosis for a Wald distribution."> --> |
| \mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda} | ||
| ``` | ||
|
|
||
| <!-- <div class="equation" align="center" data-raw-text="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" data-equation="eq:wald_expectation"> |
There was a problem hiding this comment.
Same copy-paste issue here — should reference kurtosis, not expectation.
| <!-- <div class="equation" align="center" data-raw-text="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" data-equation="eq:wald_expectation"> | |
| <!-- <div class="equation" align="center" data-raw-text="\mathop{\mathrm{Kurt}}\left( X \right) = \frac{15\mu}{\lambda}" data-equation="eq:wald_kurtosis"> |
|
|
||
| #### kurtosis( mu, lambda ) | ||
|
|
||
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] with parameters mu (mean) and lambda (shape parameter). |
There was a problem hiding this comment.
A couple of small things here: there's a double space after "the", the word "distribution" is missing after the Wald link, and mu/lambda should be in backticks. Compare with wald/mean's README:
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] with parameters mu (mean) and lambda (shape parameter). | |
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] distribution with parameters `mu` (mean) and `lambda` (shape parameter). |
|
|
||
| #### stdlib_base_dists_wald_kurtosis( mu, lambda ) | ||
|
|
||
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] with parameters mu (mean) and lambda (shape parameter). |
There was a problem hiding this comment.
Same issues as line 58 — double space, missing "distribution", and missing backticks around parameter names. For the C API description, the pattern from wald/mean is slightly different (uses "with mean mu and shape parameter lambda"):
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] with parameters mu (mean) and lambda (shape parameter). | |
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] distribution with mean `mu` and shape parameter `lambda`. |
| t.end(); | ||
| }); | ||
|
|
||
| tape( 'the function returns the expected value of a Wald distribution', function test( t ) { |
There was a problem hiding this comment.
This description was carried over from wald/mean — should say "excess kurtosis" instead of "expected value".
| tape( 'the function returns the expected value of a Wald distribution', function test( t ) { | |
| tape( 'the function returns the excess kurtosis of a Wald distribution', function test( t ) { |
| t.end(); | ||
| }); | ||
|
|
||
| tape( 'the function returns the expected value of a Wald distribution', opts, function test( t ) { |
There was a problem hiding this comment.
Same copy-paste issue as in test.js — should say "excess kurtosis" instead of "expected value".
| tape( 'the function returns the expected value of a Wald distribution', opts, function test( t ) { | |
| tape( 'the function returns the excess kurtosis of a Wald distribution', opts, function test( t ) { |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
|
@Planeshifter I have made the requested changes. Please let me know if there are any further changes to be made |
|
|
||
| > [Wald][wald-distribution] distribution [excess kurtosis][kurtosis]. | ||
|
|
||
| !-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> |
There was a problem hiding this comment.
Looks like the opening < got dropped from this HTML comment, so it'll render as visible text in the README instead of being hidden.
| !-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> | |
| <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> |
|
|
||
| #### stdlib_base_dists_wald_kurtosis( mu, lambda ) | ||
|
|
||
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] distribution with parameters mean `mu` and shape parameter `lambda`. |
There was a problem hiding this comment.
There's still a double space between "with" and "parameters" here. Let's do:
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] distribution with parameters mean `mu` and shape parameter `lambda`. | |
| Returns the [excess kurtosis][kurtosis] for a [Wald][wald-distribution] distribution with mean `mu` and shape parameter `lambda`. |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: passed
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:
Progresses #209
Description
This pull request:
Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
@stdlib-js/reviewers